package tinynio;

import java.io.Closeable;
import java.io.IOException;
import java.net.SocketAddress;
import java.util.concurrent.Executor;

public interface Communicator extends Closeable {

	public void connect(SocketAddress remote) throws IOException;

	public void bind(SocketAddress local) throws IOException;

	public void write(Object obj) throws IOException;

	public void flush() throws IOException;

	public void read() throws IOException;

	public Executor executor();

	public boolean isActive();

	public void config(Configuration config);

}
